<script setup lang="ts">
import { Menu, MenuItem } from '@electron-uikit/contextmenu/renderer'
// const ipcHandle = () => window.electron.ipcRenderer.send('ping')

document.body.addEventListener('contextmenu', (e) => {
  e.preventDefault()

  const menu = new Menu()
  menu.append(
    new MenuItem({
      type: 'checkbox',
      label: 'Menu Item One',
      click: (): void => {
        console.log('menu item one')
      }
    })
  )
  menu.append(new MenuItem({ type: 'separator' }))
  menu.append(
    new MenuItem({
      label: 'Menu Item Two',
      click: (): void => {
        console.log('menu item two')
      }
    })
  )
  menu.popup()
})
</script>

<template>
  <div id="app">
    <router-view />
  </div>
</template>

<style lang="scss">
body {
  padding: 0;
  margin: 0;
}
</style>
